// pages/service-detail/components/publisher-action/publisher-action.js
import ServiceStatus from "../../../../enum/service-status";
import serviceAction from "../../../../enum/service-action";
import behavior from  "../behavior";
import {getDataSet} from '../../../../utils/util'
Component({
  /**
   * 组件的属性列表
   */
  behaviors:[behavior],
  properties: {
    // service:Object
  },

  /**
   * 组件的初始数据
   */
  data: {
    ServiceStatusEnum:ServiceStatus,
    serviceActionEnum:serviceAction
  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleUpdateStatus(e){
      // let action = e.currentTarget.dataset.action 
      let action = getDataSet(e,'action')
      this.triggerEvent('update',{action})
      // console.log(action);
    },

    // 修改服务
    handleEditService(){  
      // console.log('修改服务');
      this.triggerEvent('edit')
    }
  }
})
